class Hero:
    hero_hp = 0
    hero_power = 0
    hero_name = 0

    def __init__(self):
        self.name = "敌人"
    def fight(self,enemy_hp,enemy_power,enemy_name):
        hero_final_hp = self.hero_hp - enemy_power
        enemy_final_hp = enemy_hp - self.hero_power
        if hero_final_hp>enemy_final_hp:
            print(f"{self.hero_name}获胜")
        elif enemy_final_hp > hero_final_hp:
            print(f"{enemy_name}获胜")
        else:
            print("平局")
class Timo(Hero):
    hero_hp = 1000
    hero_power = 210
    hero_name = "英雄"
class Jinx(Hero):
    hero_hp = 10052
    hero_power = 200
    hero_name = "敌人"
yx = Timo()
dr = Jinx()
dr.fight(yx.hero_hp,yx.hero_power,"英雄")
